﻿using System;
using LiSAClient.Core.Viewmodel;

namespace LiSAClient.WpfClient.ViewModel.Frame.Menus
{
    public class HiddenMenuItem : MenuItemBase
    {
        public Func<ContentViewModel> Content { get; private set; }

        public HiddenMenuItem(IMenuHandler menuHandler, Func<ContentViewModel> content)
            : base(menuHandler)
        {
            this.Content = content;
        }

        public override void ActivateMenuAction()
        {
            base.ActivateMenuAction();
            this.IsActivated = false;
            this.IsVisible = false;
            this.MenuHandler.ActivateHiddenMenuItem(this);
        }
    }
}
